package com.server.llh.llhserverwork.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;

import com.server.llh.llhserverwork.utils.Constant;


public class GetCardBroadCast extends BroadcastReceiver {
	private Handler mHandler=null;
	public Handler getmHandler() {
		return mHandler;
	}

	public void setmHandler(Handler mHandler) {
		this.mHandler = mHandler;
	}

	public GetCardBroadCast() {
	}

	@Override
	public void onReceive(Context context, Intent intent) {
		String action=intent.getAction();
		
		if (action.equals(Constant.READ_CARDACTION)) {
			String cardId=intent.getStringExtra("cardId");
//			getCardInfo(cardId);
			if(mHandler!=null){
				Message msg=new Message();
				msg.obj=cardId;
				msg.what=-1000;
				mHandler.sendMessage(msg);
			}
		}else if (action.equals(Constant.SET_CARDACTION)) {
			String cardId=intent.getStringExtra("cardId");
//			getCardInfo(cardId);
			if(mHandler!=null){
				Message msg=new Message();
				msg.obj=cardId;
				msg.what=-1000;
				mHandler.sendMessage(msg);
			}
		}
	}


}
